---
import data from "virtual:json-conf";
import Layout from "../../layouts/Layout.astro";
import Banner from "../../components/Banner.vue";

export function getStaticPaths() {
  return data?.addTemp?.map(({ id }) => ({
    params: { id },
  })) ?? [];
}
const { id } = Astro.params;

const config = data?.addTemp?.find(({ id: _id }) => +_id === +id);
---

<Layout>
  <div>
    {
      config?.swiper?.map((item) => (
        <Banner client:only="vue" banners={item} />
      ))
    }
  </div>
</Layout>
